package com.magic.uschat.adapter;

import com.lidroid.xutils.view.annotation.ViewInject;
import com.magic.uschat.R;
import com.magic.uschat.bean.User;
import com.magic.uschat.util.ImageUtil;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

public class SearchFriendViewHolder extends BaseViewHolder<User> {

	@ViewInject(R.id.img_friend_avatar)
	private ImageView img_friend_avatar;
	@ViewInject(R.id.tv_friend_name)
	private TextView tv_friend_name;
	
	
	public SearchFriendViewHolder(Context context, ViewGroup root,
			 OnRecyclerViewListener onRecyclerViewListener) {
		super(context, root, R.layout.item_search_friend, onRecyclerViewListener);
	}

	@Override
	public void bindData(User user) {
		ImageUtil.setAvatar(user.getAvatar(),R.drawable.head, img_friend_avatar);
		tv_friend_name.setText(user.getUsername());
	}

}
